﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.YWGZ
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.YWGZ;

    public class wf_bsgz_Map : EntityMapping<wf_bsgz>
    {
        public wf_bsgz_Map()
        {
            Property(x => x.FlowRecordId, map => map.Length(40));
            Property(x => x.gzCount);
            Property(x => x.gzDescribe, map => map.Length(10000));
            Property(x => x.gzValue);
            Property(x => x.SPFlag);
            Property(x => x.SPDate);
            Property(x => x.SPDescribe, map => map.Length(10000));
            Property(x => x.FlowRecordId, map => map.Length(40));
            Property(x => x.gzLX, map => map.Length(1000000));
            Property(x => x.gzNR, map => map.Length(1000000));
            Property(x => x.gzSubject, map => map.Length(200));

            //所属项目
            ManyToOne(x => x.gzProject, map =>
            {
                map.Column("ProjectId");
                map.NotNullable(false);
            });

            //申请人
            ManyToOne(x => x.SQUser, map =>
            {
                map.Column("SqUserId");
                map.NotNullable(false);
            });
        }
    }
}
